package com.ffyc.ssm.service;

import com.ffyc.ssm.dao.NewsDao;
import com.ffyc.ssm.modle.Ad;
import com.ffyc.ssm.modle.News;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class NewsService {

    @Autowired
    private NewsDao dao;

    public List<News> findList() {
        return dao.findList();
    }

    public void addNews(Map map) {
        dao.addNews(map);
    }

    public void delete(Integer id) {
        dao.delete(id);
    }

    public void update(Map<String, String> map) {
        dao.update(map);
    }

    public News findNews(Integer id) {
        return dao.findNews(id);
    }

    public void pass(Integer id) {
        dao.pass(id);
    }

    public void unPass(Integer id) {
        dao.unPass(id);
    }

    public List<News> passList() {
        return dao.passList();
    }
}
